dnl Process this file with autoconf to produce configure.

dnl XXX Check for headers, etc.

dnl Not yet used.
AC_INIT(otr-plugin.c)

AM_CONFIG_HEADER(config.h)

AM_INIT_AUTOMAKE(pidgin-otr, 3.0.0)

AC_PROG_CC

dnl We do not want to create a .a for the plugin, so disable by default.
AM_DISABLE_STATIC
AM_PROG_LIBTOOL

AM_PATH_LIBGCRYPT(1:1.2.0,,AC_MSG_ERROR(libgcrypt 1.2.0 or newer is required.))
AC_SUBST(LIBGCRYPT_LIBS)

## Check for libgcrypt api version ##
GCRYPT_VERSION=$(/usr/bin/libgcrypt-config --api-version 2>/dev/null || echo 0)
if test "$GCRYPT_VERSION" -eq 0; then
	AC_DEFINE(OLD_GCRYPT, 1, [Use old gcrypt API])
	AC_SUBST(OLD_GCRYPT)
fi	

AM_PATH_LIBOTR(3.0.0,,AC_MSG_ERROR(libotr 3.0.0 or newer is required.))

PKG_CHECK_MODULES(EXTRA, glib-2.0 >= 2.4 gtk+-2.0 >= 2.4 pidgin >= 2.0, , AC_MSG_ERROR(glib, gtk and pidgin required))

AC_OUTPUT([Makefile])
